package com.nt.train.service.demo;

import com.nt.train.service.IDemoService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * 在北京环境下这样实现，
 *  方案一：使用@Primary注解
 * @author hlf
 * @version 1.0
 * @date 2022/8/3 16:44
 */
@Primary
@Component
//@ConditionalOnProperty(value="deploy.province",havingValue = "beijing")
public class DemoServiceBeijing implements IDemoService {

    @Override
    public void doSomething() {
        System.out.println("北京的业务实现");
    }
}
